﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class RegisterDelegate {

	public static void RegisterDelegateConvertor()
    {
        UnityAction_float();
    }

    private static void UnityAction_float()
    {
        //下面再举一个这个Demo中没有用到，但是UGUI经常遇到的一个委托，例如UnityAction<float>
        Main.appdomain.DelegateManager.RegisterDelegateConvertor<UnityEngine.Events.UnityAction<float>>((action) =>
        {
            return new UnityEngine.Events.UnityAction<float>((a) =>
            {
                ((System.Action<float>)action)(a);
            });
        });
    }
}
